package com.patterns.strategy;

/**
 * @author fwj
 * @date 2021/4/21 14:22
 **/
public class CatWeightComparator implements Comparator<Cat> {
    @Override
    public int compare(Cat o1, Cat o2) {
        if (o1.weight < o2.weight) return -1;
        else if (o1.weight > o2.weight) return 1;
        return 0;
    }
}
